<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.wxtf.platform.plugins.user.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
UserBean user = (UserBean)request.getSession().getAttribute("userBean");
String _db = user.getDbType();

Map<String,List<Map<String, String>>> dicMap = user.getDicMap();
List<Map<String, String>> list = null;
String temp = "";	
String fs_reg_year="";//访视登记-年

list = dicMap.get("108");
if(null != list && list.size() > 0){
	for(Map<String, String> map: list){
		fs_reg_year += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
	}
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
        <title>重点服务对象访视登记</title>
        <meta http-equiv="pragma" content="no-cache"/>
	    <meta http-equiv="cache-control" content="no-cache"/>
	    <meta http-equiv="expires" content="0"/>  
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/<%=user.getUserCss()%>/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/ligerui-icons.css" />
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />

		<script type="text/javascript" src="js/jquery/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="ligerUI/js/core/base.js"></script>
		<script type="text/javascript" src="ligerUI/js/ligerui.min.js"></script>

		<script type="text/javascript" src="ligerUI/js/plugins/ligerGrid.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerTree.js"></script>

		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/validata.js"></script>
		<script type="text/javascript" src="js/json2.js"></script>
	    <script type="text/javascript">
		var _db = '<%=_db%>';			
		_jsonObj.classname = "com.wxtf.platform.main.keyserobj.KeyReg";
		_jsonObj.methodname = "queryPage";
		_jsonObj.logicdata = "[{\"types\":\"init\",\"fs_reg_year\":\"null\"}]";                          
		_jsonObj.extenddata = '';		
		var manager;
			//检查逾期，设为高亮
        function yuqi(tbe_id,tesvr_id)
        {
   	  		  var bool=true;
    	      var tbe_id=tbe_id;
    	      var tesvr_id=tesvr_id;
              var param = { 
				"classname": "com.wxtf.platform.main.keyserobj.KeyReg",
                "methodname": "yuqi",                 
				"logicdata": '[{"tbe_id":"'+tbe_id+'"}]',
				"extenddata": "[]"
			};
            callserver(param,function(data, satus){
					 if(data.resultrecord)
					 {
					 bool=true;    //不逾期
					 }
					 else 
					 {bool=false;}  //逾期
					});
					return bool;
         }	
		
		$(function(){	     
			manager = $("#user_grid").ligerGrid({
				url: _url, 
				parms: _jsonObj,
				dataAction:'server',
				method:'post',
				// rownumbers:true,
				// checkbox:true,
				enabledSort:false,
				width: '100%', 
				height:'100%',
	            usePager:true,
	            alternatingRow: false,//奇偶行显示效果
	            columns:[	            
	            { display:'职工ID', name:'tbe_id',id:'tbe_id',width:1,hide:true},	            
                { display:'所属机构ID', name:'org_id',id:'org_id',width: 1,hide:true},	            
	            { display:'是否逾期', name:'',id:'',align: 'center',width: 60,
                   render: function(record, index, value, oth){
                   	   var xx=yuqi(record.tbe_id,'0');
                       return (xx)?"否":"<font color='red'><b>是</b></font>"; 
                   }
                },	            
	            { display:'职工情况', columns:[
	                { display:'机构名称', name: 'reserve1', width:100},
	            	{ display:'姓名', name:'tbe_name',id:'tbe_name',align: 'center',width: 100,
	            	      render: function(record, index, value, oth){
                   	   var xx=yuqi(record.tbe_id,'0');
                       if(xx){
                       		return " <a href='javascript:jilu_openwindow (\""+ record.tbe_id+"\",\"" + record.org_id + "\")' >"+ value+ "</a>";
                       }else{
                       		return " <a href='javascript:jilu_openwindow (\""+ record.tbe_id+"\",\"" + record.org_id + "\")' >"+value+ "</a>";
                       }
                   		}
	            	},
	            	{ display:'身份证号', name:'tbe_idcard',id:'tbe_idcard',align: 'center',width: 180},
	            	{ display:'最后随访时间', name:'tesvr_time',id:'tesvr_time',align: 'center',width: 100},
	            	{ display:'性别', name:'tbe_sex',id:'tbe_sex',align: 'center',width: 50},
                	{ display:'子女数', name:'tbfi_children_num',id:'tbfi_children_num',align: 'center',width: 50,
                	      render: function(record, index, value, oth){
                   	  	   var xx=yuqi(record.tbe_id,'0');
                           if(xx){
                       	   return value;
                           }else{
                       	   return "<font color='red'><b>"+value+"</b></font>";
                            }
                  		   }
                	},
                	{ display:'婚姻状态', name:'tbe_marital_status',id:'tbe_marital_status',align: 'center',width: 90,
                	      render: function(record, index, value, oth){
					<%
					list = dicMap.get("27");
					temp = "";
					if(null != list && list.size() > 0){
						for(Map<String, String> map: list){
					%>
					if(value == '<%=map.get("tmgd_id")%>'){
						<%
						temp = map.get("tmgd_name");
						%>
						return '<%=temp%>';
					}
					<%
						}
					}
					%>
					return value;
				}
                	}
	            ]},
	            { display:'爱人情况',columns:[
	                { display:'配偶id', name:'tbe_spouse_id',id:'tbe_spouse_id',align: 'center',width: 1,hide:true},
	            	{ display:'姓名', name:'tbfi_spouse_name',id:'tbfi_spouse_name',align: 'center',width: 100},
	            	{ display:'性别', name:'tbfi_spouse_sex',id:'tbfi_spouse_sex',align: 'center',width: 40},
	            	{ display:'年龄', name:'tbfi_spouse_age',id:'tbfi_spouse_age',align: 'center',width:1,hide:true},
	            	{ display:'配偶出生日期', name:'tbfi_spouse_birthday',id:'tbfi_spouse_birthday',align: 'center',width: 1,hide:true},
	            	{ display:'配偶身份证号', name:'tbfi_spouse_idcard',id:'tbfi_spouse_idcard',align: 'center',width: 1,hide:true},
	            	{ display:'配偶职务', name:'tbfi_spouse_position',id:'tbfi_spouse_position',align: 'center',width: 1,hide:true},
	            	{ display:'配偶是否一汽员工', name:'tbfi_spouse_is_join',id:'tbfi_spouse_is_join',align: 'center',width: 1,hide:true},
                	{ display:'子女数', name:'tbfi_children_num',id:'tbfi_children_num',align: 'center',width: 60},
                	{ display:'单位', name:'tbfi_spouse_department',id:'tbfi_spouse_department',align: 'center',width: 100}
	            ]},
	            { display:'节育措施', name:'tbe_birth_control_measures',id:'tbe_birth_control_measures',align: 'center',width: 110,
	            render: function(record, index, value, oth){
					<%
					list = dicMap.get("104");
					temp = "";
					if(null != list && list.size() > 0){
						for(Map<String, String> map: list){
					%>
					if(value == '<%=map.get("tmgd_id")%>'){
						<%
						temp = map.get("tmgd_name");
						%>
						return '<%=temp%>';
					}
					<%
						}
					}
					%>
					return value;
				}},              
                { display:'重点理由', name:'tbe_es_reason',id:'tbe_es_reason',align: 'center',width: 200,
                     render: function(record, index, value, oth){
					<%
					list = dicMap.get("107");
					temp = "";
					if(null != list && list.size() > 0){
						for(Map<String, String> map: list){
					%>
					if(value == '<%=map.get("tmgd_id")%>'){
						<%
						temp = map.get("tmgd_name");
						%>
						return '<%=temp%>';
					}
					<%
						}
					}
					%>
					if(record.tbe_es_reason=="0"){value="无";}
					return value;
				    }
                },
                { display:'家庭住址', name:'tbe_address',id:'tbe_address',align: 'center',width: 200},               
                { display:'随访提醒时间', name:'tesvrt_time',id:'tesvrt_time',align: 'center',width: 1,hide:true,
                     render: function(record, index, value,oth,row){
					  var tesvrt_time=record.tesvrt_time;
					  var d=new Date();
					  if(d.getTime()>=Date.parse(tesvrt_time))
					  {
					      return '<font color="red"><b>'+tesvrt_time+'</b></font>';
                          return tesvrt_time;
					  }
					  else 
					  {
					  return tesvrt_time;
					  }
				    }
                },                   
	            { display: '登记',isSort:false,name:'edit',width:80,render:function(record, index, value, oth){
	               			if(record.tbe_id!="0"){
	              				return '<a href="javascript:jilu_openwindow(\''+record.tbe_id+'\',\'' + record.org_id + '\')"  class="edit_btn_div" onmouseover="this.className=\'edit_btn_div_over\'" onmouseout="this.className=\'edit_btn_div\'"><img src="ligerUI/skins/icons/edit.gif"/></div>';
	              			}
	               		}
	            },
	            { display: '往年记录查看', name:'see',width:100,render: function(record, index, value, oth){
					if(record.tbe_id!="0"){
	              				return '<a href="javascript:oldjilu_openwindow(\''+record.tbe_id+'\',\'' + record.org_id + '\')" ><img src="ligerUI/skins/icons/search.gif"/></div>';
	              			}
				    }
		     	}
	            ], 	            
	           detail: { onShowDetail: f_showOrder2 } ,
               toolbar: {
					items: [
					{ text: '新增/修改重点服务对象', click: function(){ addkey_openindow_ifr(); }, icon: 'add' }
					// { line: true }
				     		]
				},
				rowAttrRender :function(data,rowindex)
				{     
				        if(!yuqi(data.tbe_id,'0'))
						{return "style='background-color:#ffcccc;'"; }
				} 							
                });      
         });       
	
	var detail_ligergrid;
	function f_showOrder2(row, detailPanel)
	{
    var inner = $("<div style='margin:10px; width:80%; border:1px solid #A3C0E8;'></div>");
    var box1 = $("<div title='今年访视记录' style='margin:10px;'><div></div></div>");
    // var box2 = $("<div title='test' style='margin:10px;' onclick='jilu_openwindow();'><div></div></div>");
    inner.append(box1);
    inner.ligerTab();
    $(detailPanel).append(inner);
        _jsonObj.classname = "com.wxtf.platform.main.keyserobj.KeyReg";
		_jsonObj.methodname = "load_detailPanel";
		_jsonObj.logicdata = "[{\"tbe_id\":\"" + row.tbe_id + "\",\"org_id\":\"" +  row.org_id + "\",\"year\":\"" + currentTime_year()+ "\"}]";         // currentTime_year() 为当前年份
		_jsonObj.extenddata = '';	  
     detail_ligergrid=$('>div', box1).ligerGrid({
           url: _url, parms: _jsonObj, width: '99%', height: '100%',
		   usePager: true , rownumbers: false, checkbox: false, alternatingRow: true ,enabledSort:false,
                columns:
                    [
                     { display:'主键ID', name:'tesvr_id',id:'tesvr_id',hide:true,width:1},
                     { display:'家庭id', name:'tes_vistor_record.tbfi_id',id:'tes_vistor_record.tbfi_id',hide:true,width:1},
                     { display:'访视记录', name:'tesvr_description',id:'tesvr_description',width:500},
                     { display:'访视人', name:'tesvr_vistor',id:'tesvr_vistor',width:100},
                     { display:'访视时间', name:'tesvr_time',id:'tesvr_time',width:100},
                     { display:'备注', name:'tesvr_memo',id:'tesvr_memo',width:200},
                     { display:'预留字段1', name:'reserve1',id:'reserve1',hide:true,width:1},
                     { display:'预留字段2', name:'reserve2',id:'reserve2',hide:true,width:1},
                     { display:'预留字段3', name:'reserve3',id:'reserve3',hide:true,width:1},
                     { display:'预留字段4', name:'reserve4',id:'reserve4',hide:true,width:1},
                     { display:'预留字段5', name:'reserve5',id:'reserve5',hide:true,width:1},
                     { display:'录入人', name:'create_by',id:'create_by',hide:true,width:1},
                     { display:'录入时间', name:'create_time',id:'create_time',hide:true,width:1},
                     { display:'最后修改人', name:'last_modify_by',id:'last_modify_by',hide:true,width:1},
                     { display:'最后修改时间', name:'last_modify_time',id:'last_modify_time',hide:true,width:1},
                     { display: '修改',isSort:false,name:'edit',width:80,render:function(record, index, value, oth){
	               			if(row.tbe_id!="0"){
	              				return '<a href="javascript:xgfs_openwindow(\''+row.tbe_id+'\',\'' + row.org_id + '\',\'' + record.tesvr_id + 
	              				 '\',\'' + record.tesvr_description + '\',\'' + record.tesvr_vistor + '\',\'' + record.tesvr_time + '\',\'' + record.tesvr_memo + '\')"  class="edit_btn_div" onmouseover="this.className=\'edit_btn_div_over\'" onmouseout="this.className=\'edit_btn_div\'"><img src="ligerUI/skins/icons/edit.gif"/></div>';
	              			}
	               		}
	                 }  
                    ] ,
                    groupColumnName:'reserve1',
                    groupRender:function(reserve1)
                    {
                       var reserve1=reserve1;
                       return reserve1+"访视记录";  
                    }  ,                   
                    toolbar: {
			items: [
				{ text: '查看往年访视记录', click: function(){ oldjilu_openwindow(row.tbe_id,row.org_id); }, icon: 'search' }
				// { line: true },
			]
		}                                 	         
    } );   
    $(detailPanel).show();
	}
	
	
       	//打开窗口
       	var win;        
        function f_openWindow(target, title, width, height, func, func2) {
			if(win==null){
            	win = initWindowByDiv(target, title, width, height, func, func2);
			}else{
				win.show();
			}
       	}
       	      	
       	//打开修改访视记录窗口
       	var win_xgfs;
       	function xgfs_openwindow(tbe_id,org_id,tesvr_id,tesvr_description,tesvr_vistor,tesvr_time,tesvr_memo)
       	{
       	    document.getElementById('xgfs-form').reset();
       	    $("#xgfs_tbe_id").val(tbe_id);
			$("#xgfs_org_id").val(org_id);
			$("#xgfs_tesvr_id").val(tesvr_id);
			$("#xgfs_tesvr_description").val(tesvr_description);
			$("#xgfs_tesvr_vistor").val(tesvr_vistor);
			$("#xgfs_tesvr_time").val(tesvr_time);
			$("#xgfs_tesvr_memo").val(tesvr_memo);	
			$("#xgfs_tesvr_time").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
        	var param_xgsf = { 
				"classname": "com.wxtf.platform.main.keyserobj.KeyReg",
                "methodname": "xgfs",                 
				"logicdata": "[]",
				"extenddata": "[]"
			};
			win_xgfs=initWindowByDiv('xgfs-div', '修改访视登记', 900, 200 ,function()
				{  
					var tbe_id = $("#xgfs_tbe_id").val();
					var org_id = $("#xgfs_org_id").val();
					var tesvr_id = $("#xgfs_tesvr_id").val();
					var tesvr_description = $("#xgfs_tesvr_description").val();  //访视记录
					var tesvr_vistor = $("#xgfs_tesvr_vistor").val();  //访视人
					var tesvr_time = $("#xgfs_tesvr_time").val();  //访视时间
					var tesvr_memo = $("#xgfs_tesvr_memo").val();  //备注
					
					if(!checkIsString(tesvr_description)){
						warningTip("访视记录：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_description) > 1024){
						warningTip('访视记录：不能超过1024字符');
						return;
					}
					if(!checkIsString(tesvr_vistor)){
						warningTip("访视人：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_vistor) > 32){
						warningTip('访视人：不能超过32字符');
						return;
					}
					if(!checkIsString(tesvr_memo)){
						warningTip("备注：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_memo) > 512){
						warningTip('备注：不能超过512字符');
						return;
					}
					
					param_xgsf.logicdata = '[{"tbe_id":"'+tbe_id+'","org_id":"'+org_id+'","tesvr_id":"'+tesvr_id+'","tesvr_description":"'+tesvr_description+'","tesvr_vistor":"'+tesvr_vistor+'","tesvr_time":"'+tesvr_time+'","tesvr_memo":"'+tesvr_memo+'"}]';
				    if( xgfs_beforeSum(tesvr_description,tesvr_time))
				    { callserver(param_xgsf,function(data, satus){
						if(data.result || data.result == 'true'){
							succMsgTip(data.resultrecord);
						}else{
							warningTip(data.resultrecord);
						}
						detail_ligergrid.loadData();
						win_xgfs.hide();
					},function(data, satus){
						warningTip(data.resultrecord);
					});
					}
				},closeWin
			);	
       	}
       	//修改访视提交验证
       	function xgfs_beforeSum(tesvr_description,tesvr_time)
       	{
       	   var fin_val=1;
       	   var tip="";
       	   if(tesvr_description==""||tesvr_description==null){tip+="[访视记录]";}
       	   if(tesvr_time==""||tesvr_time==" "||tesvr_time==null){tip+="[访视时间]";}
       	   if(tip!=""){warningTip("请输入"+tip+"！");fin_val=0;}
       	   return fin_val;
       	}
       	
		//打开"登记"窗口
       function jilu_openwindow(tbe_id,org_id){
			document.getElementById('reg-form').reset();
			$("#tbe_id_dj").val(tbe_id);
			$("#org_id_dj").val(org_id);
		    $("#tesvr_time").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
			$("#tesvr_time_s2").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
			$("#tesvr_time_s3").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
			$("#tesvr_time_s4").ligerDateEditor({ format: "yyyy-MM-dd", width:182 });
			var param_dj = { 
				"classname": "com.wxtf.platform.main.keyserobj.KeyReg",
                "methodname": "",                 
				"logicdata": [],
				"extenddata": []
			};
			param_dj.methodname="load_and_set";
			param_dj.logicdata = '[{"tbe_id":"'+tbe_id+'","season":"'+$("#reserve1").val()+'"}]';
			callserver(param_dj, function(data, satus){
			    if(data!=null){
		                $("#tesvr_time").val(data.tesvr_time);
						$("#tesvr_vistor").val(data.tesvr_vistor);
						$("#tesvr_description").val(data.tesvr_description);
						$("#tesvr_memo").val(data.tesvr_memo);
						$("#flag_s1").val("1");
						}
						else{
						$("#tesvr_time").val("");
						//$("#tesvr_vistor").val("");
						$("#tesvr_description").val("");
						$("#tesvr_memo").val("");
						}
			},function(data, satus){
						warningTip(data.resultrecord);
			});	
			param_dj.methodname="load_and_set";
			param_dj.logicdata = '[{"tbe_id":"'+tbe_id+'","season":"'+$("#reserve1_s2").val()+'"}]';
			callserver(param_dj, function(data, satus){
			    if(data!=null){
		                $("#tesvr_time_s2").val(data.tesvr_time);
						$("#tesvr_vistor_s2").val(data.tesvr_vistor);
						$("#tesvr_description_s2").val(data.tesvr_description);
						$("#tesvr_memo_s2").val(data.tesvr_memo);
						$("#flag_s2").val("1");
						}
						else{
						$("#tesvr_time_s2").val("");
						//$("#tesvr_vistor_s2").val("");
						$("#tesvr_description_s2").val("");
						$("#tesvr_memo_s2").val("");
						}
			},function(data, satus){
						warningTip(data.resultrecord);
			});
			
			param_dj.methodname="load_and_set";
			param_dj.logicdata = '[{"tbe_id":"'+tbe_id+'","season":"'+$("#reserve1_s3").val()+'"}]';
			callserver(param_dj, function(data, satus){
			    if(data!=null){
		                $("#tesvr_time_s3").val(data.tesvr_time);
						$("#tesvr_vistor_s3").val(data.tesvr_vistor);
						$("#tesvr_description_s3").val(data.tesvr_description);
						$("#tesvr_memo_s3").val(data.tesvr_memo);
						$("#flag_s3").val("1");
						}
						else{
						$("#tesvr_time_s3").val("");
						//$("#tesvr_vistor_s3").val("");
						$("#tesvr_description_s3").val("");
						$("#tesvr_memo_s3").val("");
						}
			},function(data, satus){
						warningTip(data.resultrecord);
			});
			
			param_dj.methodname="load_and_set";
			param_dj.logicdata = '[{"tbe_id":"'+tbe_id+'","season":"'+$("#reserve1_s4").val()+'"}]';
			callserver(param_dj, function(data, satus){
			    if(data!=null){
		                $("#tesvr_time_s4").val(data.tesvr_time);
						$("#tesvr_vistor_s4").val(data.tesvr_vistor);
						$("#tesvr_description_s4").val(data.tesvr_description);
						$("#tesvr_memo_s4").val(data.tesvr_memo);
						$("#flag_s4").val("1");
						}
						else{
						$("#tesvr_time_s4").val("");
						//$("#tesvr_vistor_s4").val("");
						$("#tesvr_description_s4").val("");
						$("#tesvr_memo_s4").val("");
						}
			},function(data, satus){
						warningTip(data.resultrecord);
			});
			
			f_openWindow('reg-div', '访视登记', 900, 450 ,function()
		    {					
					var tbe_id = $("#tbe_id_dj").val();  //员工id
					var org_id = $("#org_id_dj").val();  //组织机构id
					var tesvr_description = $("#tesvr_description").val();  //访视记录
					var tesvr_vistor = $("#tesvr_vistor").val();  //访视人
					var tesvr_time = $("#tesvr_time").val();  //访视时间
					var tesvr_memo = $("#tesvr_memo").val();  //备注
	                var tesvr_description_s2 = $("#tesvr_description_s2").val();  //访视记录
					var tesvr_vistor_s2 = $("#tesvr_vistor_s2").val();  //访视人
					var tesvr_time_s2 = $("#tesvr_time_s2").val();  //访视时间
					var tesvr_memo_s2 = $("#tesvr_memo_s2").val();  //备注
					var tesvr_description_s3 = $("#tesvr_description_s3").val();  //访视记录
					var tesvr_vistor_s3 = $("#tesvr_vistor_s3").val();  //访视人
					var tesvr_time_s3 = $("#tesvr_time_s3").val();  //访视时间
					var tesvr_memo_s3 = $("#tesvr_memo_s3").val();  //备注
					var tesvr_description_s4 = $("#tesvr_description_s4").val();  //访视记录
					var tesvr_vistor_s4 = $("#tesvr_vistor_s4").val();  //访视人
					var tesvr_time_s4 = $("#tesvr_time_s4").val();  //访视时间
					var tesvr_memo_s4 = $("#tesvr_memo_s4").val();  //备注
					//第一季度验证
					if(!checkIsString(tesvr_description)){
						warningTip("第一季度访视记录：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_description) > 1024){
						warningTip('第一季度访视记录：不能超过1024字符');
						return;
					}
					if(!checkIsString(tesvr_vistor)){
						warningTip("第一季度访视人：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_vistor) > 32){
						warningTip('第一季度访视人：不能超过32字符');
						return;
					}
					if(!checkIsString(tesvr_memo)){
						warningTip("第一季度备注：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_memo) > 512){
						warningTip('第一季度备注：不能超过512字符');
						return;
					}
					//第二季度验证
					if(!checkIsString(tesvr_description_s2)){
						warningTip("第二季度访视记录：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_description_s2) > 1024){
						warningTip('第二季度访视记录：不能超过1024字符');
						return;
					}
					if(!checkIsString(tesvr_vistor_s2)){
						warningTip("第二季度访视人：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_vistor_s2) > 32){
						warningTip('第二季度访视人：不能超过32字符');
						return;
					}
					if(!checkIsString(tesvr_memo_s2)){
						warningTip("第二季度备注：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_memo_s2) > 512){
						warningTip('第二季度备注：不能超过512字符');
						return;
					}
					//第三季度验证
					if(!checkIsString(tesvr_description_s3)){
						warningTip("第三季度访视记录：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_description_s3) > 1024){
						warningTip('第三季度访视记录：不能超过1024字符');
						return;
					}
					if(!checkIsString(tesvr_vistor_s3)){
						warningTip("第三季度访视人：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_vistor_s3) > 32){
						warningTip('第三季度访视人：不能超过32字符');
						return;
					}
					if(!checkIsString(tesvr_memo_s3)){
						warningTip("第三季度备注：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_memo_s3) > 512){
						warningTip('第三季度备注：不能超过512字符');
						return;
					}
					//第四季度验证
					if(!checkIsString(tesvr_description_s4)){
						warningTip("第四季度访视记录：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_description_s4) > 1024){
						warningTip('第四季度访视记录：不能超过1024字符');
						return;
					}
					if(!checkIsString(tesvr_vistor_s4)){
						warningTip("第四季度访视人：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_vistor_s4) > 32){
						warningTip('第四季度访视人：不能超过32字符');
						return;
					}
					if(!checkIsString(tesvr_memo_s4)){
						warningTip("第四季度备注：必须为字母、数字、下划线、中文组成");
						return;
					}
					if(fucCheckLength(tesvr_memo_s4) > 512){
						warningTip('第四季度备注：不能超过512字符');
						return;
					}
					
					if(tbe_id!=""){
					param_dj.methodname="insert";
					param_dj.logicdata = '[{"tbe_id":"'+tbe_id+'","org_id":"'+org_id+'","tesvr_description":"'+tesvr_description+'","tesvr_vistor":"'+tesvr_vistor+'","tesvr_time":"'+tesvr_time+'","tesvr_memo":"'+tesvr_memo+'" ,"tesvr_description_s2":"'+tesvr_description_s2+'","tesvr_vistor_s2":"'+tesvr_vistor_s2+'","tesvr_time_s2":"'+tesvr_time_s2+'","tesvr_memo_s2":"'+tesvr_memo_s2+'"  ,"tesvr_description_s3":"'+tesvr_description_s3+'","tesvr_vistor_s3":"'+tesvr_vistor_s3+'","tesvr_time_s3":"'+tesvr_time_s3+'","tesvr_memo_s3":"'+tesvr_memo_s3+'","tesvr_description_s4":"'+tesvr_description_s4+'","tesvr_vistor_s4":"'+tesvr_vistor_s4+'","tesvr_time_s4":"'+tesvr_time_s4+'","tesvr_memo_s4":"'+tesvr_memo_s4+'"}]';
					if(beforeSub(tesvr_description,tesvr_time,tesvr_description_s2,tesvr_time_s2,tesvr_description_s3,tesvr_time_s3,tesvr_description_s4,tesvr_time_s4))
					{
						callserver(param_dj,function(data, satus){
						if(data.result || data.result == 'true'){
							succMsgTip(data.resultrecord);
						}else{
							warningTip(data.resultrecord);
						}
							reload();
							win.hide();
						},function(data, satus){
							warningTip(data.resultrecord);						
						});
					}
			     }      
			}, 
			function()
			{
				win.hide();				
			}
			);
		}
 
 //访视登記前判斷輸入
function beforeSub(tesvr_description,tesvr_time,tesvr_description_s2,tesvr_time_s2,tesvr_description_s3,tesvr_time_s3,tesvr_description_s4,tesvr_time_s4)
{
   var fin_val=1;
   var tip="";
   if(tesvr_description!=""&&tesvr_description!=null)
   {
       if(tesvr_time==""||tesvr_time==" "||tesvr_time==null) {tip+="[第一季度]";}
   }
   if(tesvr_time!=""&&tesvr_time!=" "&&tesvr_time!=null)
   {	 var time=tesvr_time.split("-");
         if(Number(time[1])<1||Number(time[1])>3)
         {
         	warningTip("第一季度日期输入错误，请输入1-3月份的日期！");
         	fin_val=0;
         	return fin_val;
         }
   }
   if(tesvr_description_s2!=""&&tesvr_description_s2!=null)
   {
       if(tesvr_time_s2==""||tesvr_time_s2==" "||tesvr_time_s2==null) {tip+="[第二季度]";}
   }
   if(tesvr_time_s2!=""&&tesvr_time_s2!=" "&&tesvr_time_s2!=null)
   {
         var time=tesvr_time_s2.split("-");
         if(Number(time[1])<4||Number(time[1])>6)
         {
         	warningTip("第二季度日期输入错误，请输入4-6月份的日期！");
         	fin_val=0;
         	return fin_val;
         }
   }  
   if(tesvr_description_s3!=""&&tesvr_description_s3!=null)
   {
       if(tesvr_time_s3==""||tesvr_time_s3==" "||tesvr_time_s3==null) {tip+="[第三季度]";}
   }
   if(tesvr_time_s3!=""&&tesvr_time_s3!=" "&&tesvr_time_s3!=null)
   {
   		var time=tesvr_time_s3.split("-");
         if(Number(time[1])<7||Number(time[1])>9)
         {
         	warningTip("第三季度日期输入错误，请输入7-9月份的日期！");
         	fin_val=0;
         	return fin_val;
         }
   }
   if(tesvr_description_s4!=""&&tesvr_description_s4!=null)
   {
       if(tesvr_time_s4==""||tesvr_time_s4==" "||tesvr_time_s4==null) {tip+="[第四季度]";}
   }
   if(tesvr_time_s4!=""&&tesvr_time_s4!=" "&&tesvr_time_s4!=null)
   {
         var time=tesvr_time_s4.split("-");
         if(Number(time[1])<10||Number(time[1])>12)
         {
         	warningTip("第四季度日期输入错误，请输入10-12月份的日期！");
         	fin_val=0;
         	return fin_val;
         }
   }
   if(tip!=""){warningTip("请输入"+tip+"访视时间！");fin_val=0;}
   return fin_val;
}
 
 
 //打开"往年访视记录"窗口
var detailPanel;
var param_detailPanel;
function oldjilu_openwindow(tbe_id,org_id)
{
	document.getElementById('detailPanel-form').reset();
	$("#tbe_id").val(tbe_id);
	$("#org_id").val(org_id);
	param_detailPanel = { 
				"classname": "com.wxtf.platform.main.keyserobj.KeyReg",
				"methodname": "load_detailPanel",
				"logicdata": "[]",
				"extenddata": "[]"
			};
	    var tbe_id = $("#tbe_id").val();
		var org_id = $("#org_id").val();
		var fs_year = $("#fs_year").val();
		param_detailPanel.logicdata = '[{"tbe_id":"'+tbe_id+'","org_id":"'+org_id+'","year":"'+fs_year+'"}]';
		detailPanel = $("#detailPabel-grid").ligerGrid({
		 	url: _url, parms: param_detailPanel, width: '770', height: '360',enabledSort:false,
		    usePager: true , rownumbers: true, checkbox: false, alternatingRow: true ,
			columns:
                    [
                     { display:'主键ID', name:'tesvr_id',id:'tesvr_id',hide:true,width:1},
                     { display:'家庭id', name:'tes_vistor_record.tbfi_id',id:'tes_vistor_record.tbfi_id',hide:true,width:1},
                     { display:'访视记录', name:'tesvr_description',id:'tesvr_description',width:300},
                     { display:'访视人', name:'tesvr_vistor',id:'tesvr_vistor',width:100},
                     { display:'访视时间', name:'tesvr_time',id:'tesvr_time',width:100},
                     { display:'备注', name:'tesvr_memo',id:'tesvr_memo',width:200},
                     { display:'预留字段1', name:'reserve1',id:'reserve1',hide:true,width:1},
                     { display:'预留字段2', name:'reserve2',id:'reserve2',hide:true,width:1},
                     { display:'预留字段3', name:'reserve3',id:'reserve3',hide:true,width:1},
                     { display:'预留字段4', name:'reserve4',id:'reserve4',hide:true,width:1},
                     { display:'预留字段5', name:'reserve5',id:'reserve5',hide:true,width:1},
                     { display:'录入人', name:'create_by',id:'tes_vistor_record.create_by',hide:true,width:1},
                     { display:'录入时间', name:'create_time',id:'tes_vistor_record.create_time',hide:true,width:1},
                     { display:'最后修改人', name:'last_modify_by',id:'last_modify_by',hide:true,width:1},
                     { display:'最后修改时间', name:'last_modify_time',id:'last_modify_time',hide:true,width:1}  
                    ] ,
               groupColumnName:'reserve1',
               groupRender:function(reserve1)
                    {
                       var reserve1=reserve1;
                       return reserve1+"访视记录";
                    } 
	});		
	 initWindowByDiv('detailPanel-div', '往年访视记录', 800, 460, function()            
	 {
		var fs_year = $("#fs_year").val();
		param_detailPanel.logicdata = '[{"tbe_id":"'+tbe_id+'","org_id":"'+org_id+'","year":"'+fs_year+'"}]';
	    detailPanel.loadData();
	},closeWin );
	
	// detailPanel.loadData();
}
           
       
        //页面刷新
	        function reload(){
	            var fs_reg_year= $('#fs_reg_year').val();        
	        	_jsonObj.methodname = "queryPage";
				_jsonObj.logicdata = "[{\"types\":\"init\",\"fs_reg_year\":\"" +  fs_reg_year + "\"}]";
				manager.loadData();
	        }
		
		//"往年访视登记记录"页面刷新
	        function detailPanel_reload(){
	            var tbe_id = $("#tbe_id").val();
	            var fs_year= $('#fs_year').val();   
				param_detailPanel.logicdata = '[{"tbe_id":"'+tbe_id+'","year":"'+fs_year+'"}]';
	   			detailPanel.loadData();
	     }
	   
	    //获取当前年
		function currentTime_year()
		{
		    var d = new Date(),
		    str = '';
 			str += d.getFullYear();
			return str;
		   
		}
        
        //"新增重点对象"窗口
       function  addkey_openindow_ifr()
        {
            document.getElementById('addkey-form').reset();
            //引用一个iframe 在最下面
			// parent.frames['if10_setkey'].document.location="jsp/app/keySerObj/keySet.jsp";
			$("#if10_setkey").attr({"src":"jsp/app/keySerObj/keySet.jsp"});
		    var win_addkey_openindow_ifr =initWindowByDiv('test_div10_setkey', '新增重点服务对象', 950, 500 ,function()
			{
				reload();
				win_addkey_openindow_ifr.hide();
			},closeWin 
			);    
        }
        
        //"逾期提醒规则设置"窗口
       function  setrole_openindow_ifr()
        {
            document.getElementById('addkey-form').reset();
            //引用一个iframe 在最下面
			// parent.frames['if10_setkey'].document.location="jsp/app/keySerObj/keySet.jsp";
			$("#if10_setkey").attr({"src":"jsp/app/keySerObj/systemSetTimeRole.jsp"});
		    var win_setrole_openindow_ifr =initWindowByDiv('test_div10_setkey', '逾期提醒规则设置', 900, 500 ,function()
			{
				reload();
				win_setrole_openindow_ifr.hide();
			},closeWin 
			);    
        }

       //重置-条件查询
	  function serReset(){
		$('#ser_name').val('');
		$('#ser_idcard').val('');
		}
        
        //条件查询
        function serch1(){
			var orgIds = $('#ser_org').val();
			var tbe_name = $('#ser_name').val();
			var tbe_idcard = $('#ser_idcard').val();
			_jsonObj.methodname = "queryPage";
			_jsonObj.logicdata = '[{\"orgIds\":\"' + orgIds + '\",\"types\":\"serch1\",\"tbe_name\":\"' + tbe_name+'\",\"tbe_idcard\":\"' + tbe_idcard+'\"}]';
			manager.loadData();
		}
     
 /*
 * 导出
 */
function expData(){
	var orgIds = $('#ser_org').val();
	var tbe_name = $('#ser_name').val().trim();
	var tbe_idcard = $('#ser_idcard').val().trim();

	_jsonObj.methodname = "expData";
	_jsonObj.logicdata = '[{\"orgIds\":\"' + orgIds + '\",\"tbe_name\":\"' + tbe_name + '\",\"tbe_idcard\":\"' + tbe_idcard + '\"}]';
	
	callserver(_jsonObj, function(data, textStatus){
		if(data.result){
			downloadFile(data.resultrecord);
		} else {
			warningTip(data.resultrecord);
		}
	}, function(data, textStatus){
	   warningTip(data.resultrecord);
	});
}
     
	</script>
	</head>
<body>
		<table class="serTable">
			<tr>
				<td>
					机构：<select id="ser_org" style=" width: 160px;">
						<%=user.getCurSubOrgOptions()%>
					</select>
				</td>
				<td>姓名：<input id="ser_name"/></td>
				<td>身份证：<input id="ser_idcard"/></td>
				<td><input class="btn2" value="搜索" type="button" onclick="serch1();" /></td>
				<td><input class="btn2" value="重置" type="button" onclick="serReset();" /></td>
				<td><input class="btn2" value="导出" type="button" onclick="expData();" /></td>
			</tr>
			<tr>
			</tr>	
		</table>

		<!-- 用户grid显示 -->
		<div id="user_grid"></div>

		<!-- 修改访视记录窗口 -->
		<div id="xgfs-div" style="display: none;">
			<form id="xgfs-form" name="xgfs-form">
               <table class="form_table">
                     <tr>
						<td></td>
						<td><input class="textbg1" id="xgfs_tbe_id" name="xgfs_tbe_id" type="hidden" disabled="disabled" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"/></td>
						<td></td>
						<td></td>
						<td><input class="textbg1" id="xgfs_org_id" name="xgfs_org_id" type="hidden" disabled="disabled" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"/></td>
						<td></td> 
						<td><input class="textbg1" id="xgfs_tesvr_id" name="xgfs_tesvr_id" type="hidden" disabled="disabled" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"/></td>
						<td></td>
						<td></td>
					</tr>
                    <tr>
						<td colspan="9" align="left">
							<div style="border-bottom: 1px solid #EBEBEB; font-weight:bold;height: 28px; line-height: 28px;margin: 0 0 5px;" >
								<img src="ligerUI/skins/icons/communication.gif"/>
								<span>修改访视信息</span>
							</div>
						</td>
					</tr>
					<tr>					
						<td class="form_label">访视记录：</td>						
						<td colspan="8" align="left"><input class="textbg1" id="xgfs_tesvr_description" name="xgfs_tesvr_description"   onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>                        
					</tr>
                    <tr>
                        <td class="form_label">访视人：</td>
						<td><input class="textbg1" id="xgfs_tesvr_vistor" name="xgfs_tesvr_vistor"   onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>
						<td class="form_label">访视时间：</td>
						<td><input  id="xgfs_tesvr_time" name="xgfs_tesvr_time" onkeyup="this.value=formatdata(this.value);"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" /></td>
                        <td><font color="red">*</font></td>
                        <td class="form_label">备注：</td>
						<td><input class="textbg1" id="xgfs_tesvr_memo" name="xgfs_tesvr_memo"   onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>   
                    </tr>
               </table>
			</form>
		</div>

		<!-- 登记窗口 -->
		<div id="reg-div" style="display: none;" >
			<form id="reg-form" name="reg-form">
				<input type="hidden" id="tbe_id_dj" name="tbe_id_dj" value="" />
				<input type="hidden" id="org_id_dj" name="org_id_dj" value="" />
				<input type="hidden" id="tbe_political_status" name="tbe_political_status" value="" />
				<input type="hidden" id="reserve2" name="reserve2" value="" />
				<input type="hidden" id="reserve3" name="reserve3" value="" />
				<input type="hidden" id="reserve4" name="reserve4" value="" />
				<input type="hidden" id="reserve5" name="reserve5" value="" />
				<input type="hidden" id="create_by" name="create_by" value="" />
				<input type="hidden" id="create_time" name="create_time" value="" />
				<input type="hidden" id="last_modify_by" name="last_modify_by" value="" />
				<input type="hidden" id="last_modify_time" name="last_modify_time" value="" />			
				<table class="form_table">
					<tr>
						<td colspan="9" align="left">
							<div style="border-bottom: 1px solid #EBEBEB; font-weight:bold;height: 28px; line-height: 28px;margin: 0 0 5px;" >
								<img src="ligerUI/skins/icons/communication.gif"/>
								<span>第一季度访视信息</span>
							</div>
						</td>
					</tr>
					<tr>					
						<td class="form_label">访视记录：</td>						
						<td colspan="6" align="left"><input class="textbg1" id="tesvr_description" name="tesvr_description" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
                        <td><input type="hidden" id="reserve1" name="reserve1" value="第一季度" /></td>
                        
                         <input type="hidden" id="flag_s1" name="flag_s1" value="0" />
					</tr>
                    <tr>
                        <td class="form_label">访视人：</td>
						<td><input class="textbg1" id="tesvr_vistor" name="tesvr_vistor" value="<%=user.getUserrelName() %>"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>
						<td class="form_label">访视时间：</td>
						<td><input id="tesvr_time" name="tesvr_time" value="" onkeyup="this.value=formatdata(this.value);" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" ></td>
                        <td></td>
                        
                        <td class="form_label">备注：</td>
						<td><input class="textbg1" id="tesvr_memo" name="tesvr_memo"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>   
                    </tr>
					<tr>
						<td colspan="9" align="left">
							<div style="border-bottom: 1px solid #EBEBEB; font-weight:bold;height: 28px; line-height: 28px;margin: 0 0 5px;" >
								<img src="ligerUI/skins/icons/communication.gif"/>
								<span>第二季度访视信息</span>
							</div>
						</td>
					</tr>
					<tr>					
						<td class="form_label">访视记录：</td>						
						<td colspan="6" align="left"><input class="textbg1" id="tesvr_description_s2" name="tesvr_description_s2"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
                        <td><input id="reserve1_s2" type="hidden" name="reserve1_s2" value="第二季度" /></td>                       
                        <input id="flag_s2" type="hidden" name="flag_s2" value="0" />
					</tr>
                    <tr>
                        <td class="form_label">访视人：</td>
						<td><input class="textbg1" id="tesvr_vistor_s2" name="tesvr_vistor_s2" value="<%=user.getUserrelName() %>"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>
						<td class="form_label">访视时间：</td>
						<td><input  id="tesvr_time_s2" name="tesvr_time_s2" value="" onkeyup="this.value=formatdata(this.value);" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" ></td>
                        <td></td>                      
                        <td class="form_label">备注：</td>
						<td><input class="textbg1" id="tesvr_memo_s2" name="tesvr_memo_s2"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>   
                    </tr>                    
                    <tr>
						<td colspan="9" align="left">
							<div style="border-bottom: 1px solid #EBEBEB; font-weight:bold;height: 28px; line-height: 28px;margin: 0 0 5px;" >
								<img src="ligerUI/skins/icons/communication.gif"/>
								<span>第三季度访视信息</span>
							</div>
						</td>
					</tr>
					<tr>					
						<td class="form_label">访视记录：</td>						
						<td colspan="6" align="left"><input class="textbg1" id="tesvr_description_s3" name="tesvr_description_s3" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
                        <td><input id="reserve1_s3" type="hidden" name="reserve1_s3" value="第三季度" /></td>                        
                        <input id="flag_s3" name="flag_s3" type="hidden" value="0" />
					</tr>
                    <tr>
                        <td class="form_label">访视人：</td>
						<td><input class="textbg1" id="tesvr_vistor_s3" name="tesvr_vistor_s3" value="<%=user.getUserrelName() %>"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>
						<td class="form_label">访视时间：</td>
						<td><input  id="tesvr_time_s3" name="tesvr_time_s3" value="" onkeyup="this.value=formatdata(this.value);" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" ></td>
                        <td></td>                      
                        <td class="form_label">备注：</td>
						<td><input class="textbg1" id="tesvr_memo_s3" name="tesvr_memo_s3"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>   
                    </tr>                  
                    <tr>
						<td colspan="9" align="left">
							<div style="border-bottom: 1px solid #EBEBEB; font-weight:bold;height: 28px; line-height: 28px;margin: 0 0 5px;" >
								<img src="ligerUI/skins/icons/communication.gif"/>
								<span>第四季度访视信息</span>
							</div>
						</td>
					</tr>
					<tr>					
						<td class="form_label">访视记录：</td>						
						<td colspan="6" align="left"><input class="textbg1" id="tesvr_description_s4" name="tesvr_description_s4"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
                        <td><input id="reserve1_s4" name="reserve1_s4" type="hidden" value="第四季度" /></td>
                       
                        <input id="flag_s4" name="flag_s4" type="hidden" value="0" />
					</tr>
                    <tr>
                        <td class="form_label">访视人：</td>
						<td><input class="textbg1" id="tesvr_vistor_s4" name="tesvr_vistor_s4" value="<%=user.getUserrelName()%>"  onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>
						<td class="form_label">访视时间：</td>
						<td><input  id="tesvr_time_s4" name="tesvr_time_s4" value="" onkeyup="this.value=formatdata(this.value);" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'" ></td>
                        <td></td>                       
                        <td class="form_label">备注：</td>
						<td><input class="textbg1" id="tesvr_memo_s4" name="tesvr_memo_s4" onMouseOver="this.style.borderColor='#4fa8e6'" onMouseOut="this.style.borderColor='#A1A3A1'"></td>
						<td></td>   
                    </tr>                   
					<tr><td><br /></td></tr>
				</table>
			</form>
		</div>

	    <!-- 展开的grid -->
		<div id="detailPanel-div" style="display: none;">
			<form id="detailPanel-form" name="detailPanel-form">
			<input type="hidden" id="tbe_id" name="tbe_id"/>
			<input type="hidden" id="org_id" name="org_id"/>					
				<table class="form_table">
					<tr>
						<td align="left" >年份：
							<select id="fs_year" name="fs_year" style=" width: 140px;" Onchange="detailPanel_reload(tbe_id,this.value);"> 
				  			<option value="">全部</option>
				 			 <%=fs_reg_year%> 
							</select>
						</td>
						<td></td>
					</tr>
					<tr>
						<td colspan="2"></td>
					</tr>
					<tr>
						<td colspan="2" align="left"><div id="detailPabel-grid"></div></td>	
					</tr>					
				</table>
			</form>
		</div>
		
		<!-- 新增重点窗口 -->
		<div id="test_div10_setkey" class="addkey-window" title="职员信息"
			modal="true" closed="true" minimizable="false" maximizable="false"
			iconcls="icon-save"
			style="width:98% ; height:97%;  padding: 5px; background:#fafafa; ">
			<form id="addkey-form" name="addkey-form">
				<div  class="addkey-layout" fit="true" style="width:920px ; height:425px; " >
					<div region="center" border="false" style="text-align: center; height: 99%; line-height: 30px;">  
					<iframe id="if10_setkey" name="if10_setkey" scrolling="no" width="99%" height="99%" >
					</iframe>
					</div>
				</div>
				
		    </form>
		</div>

	</body>
</html>
